package com.yx1996.test.day02;

import com.yx1996.bean.day02.service.UserService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import javax.annotation.Resource;


//创建容器
@RunWith(SpringJUnit4ClassRunner.class)
//指定创建容器时使用哪个配置文件
@ContextConfiguration("classpath:annotations_aop.xml")
public class test_annotations_aop {

    //直接创建需要测试的变量并且注入值
    @Resource(name = "userService")

    private UserService us;

    @Test
    //测试Junit测试整合
    public void fun2() {

        us.add();
        System.out.println();
    }
}
